Windows OpenFile function

The Windows OpenFile function searches for a matching file in the following directories in the following order:

  1. The current directory.

  2. The Windows directory, whose path the GetWindowsDirectory function retrieves.

  3. The Windows system directory, whose path the GetSystemDirectory function retrieves.

  4. The directory containing the executable file for the current task; the GetModuleFileName function obtains the path of this directory.

  5. The directories listed in the PATH environment variable.

  6. The list of directories mapped in a network.